public class Student {
    // 创建对象Student
    int number;
    int state;
    int score;

    public void random() {
        // 赋值
        number = number + 1;
        state = (int) (Math.random() * 6 + 1);
        score = (int) (Math.random() * 101);
    }

    public void show(){
        System.out.println("学号：" + number + "\t年级：" + state + "\t分数：" +score);
    }
}
